import axios from '~/axios.js'

// 获取平台统计概览
export function getPlatformOverviewApi() {
    return axios.get('/basic/lindi/dashboard/overview')
}

// 获取各街道镇区林地面积统计数据
export function getAreaStatisticsApi() {
    return axios.get('/basic/lindi/dashboard/area-statistics')
}

// 获取各镇区街道林地交易情况
export function getTradeStatisticsApi() {
    return axios.get('/basic/lindi/dashboard/trade-statistics')
}

// 获取资金营收统计
export function getRevenueStatisticsApi() {
    return axios.get('/basic/lindi/dashboard/revenue-statistics')
}

// 获取地图数据
export function getMapDataApi() {
    return axios.get('/basic/lindi/dashboard/map-data')
}

// 获取林地补贴申请统计
export function getSubsidyStatisticsApi() {
    return axios.get('/basic/lindi/dashboard/subsidy-statistics')
}

// 获取企业信息注册统计
export function getCompanyStatisticsApi() {
    return axios.get('/basic/lindi/dashboard/company-statistics')
}

// 获取交易订单统计
export function getOrderStatisticsApi() {
    return axios.get('/basic/lindi/dashboard/order-statistics')
}

// 获取完整的仪表板数据
export function getDashboardDataApi() {
    return axios.get('/basic/lindi/dashboard/data')
}

// SSE相关API
// 启动数据推送
export function startDataPushApi() {
    return axios.post('/lindi/dashboard/sse/start-push')
}

// 停止数据推送
export function stopDataPushApi() {
    return axios.post('/lindi/dashboard/sse/stop-push')
}

// 获取SSE连接信息
export function getSseConnectionsApi() {
    return axios.get('/lindi/dashboard/sse/connections')
}

// 手动触发数据推送
export function pushDataNowApi() {
    return axios.post('/lindi/dashboard/sse/push-now')
}